/*
 * ResourceExtractorAspect.h
 *
 *  Created on: Nov 16, 2008
 *      Author: Ryan
 */

#ifndef RESOURCEEXTRACTORASPECT_H_
#define RESOURCEEXTRACTORASPECT_H_

#include "UnitAspect.h"

#include "../../Resource.h"
#include "../../GameMap.h"
#include "../../Point3.h"

namespace OOInterface
{

class ResourceExtractorAspect: public OOInterface::UnitAspect
{
public:
	ResourceExtractorAspect();
	virtual ~ResourceExtractorAspect();

	virtual void accept( UnitVisitor& v ) const { v.visitResourceExtractorAspect( *this ); }

	float getAmountGenerated( const Resource& r, const GameMap& map, const Point3f& loc ) const;

	inline float getRadius() const { return _radius; }
	inline const Resource& getResourceExtracted() const { return *_resource; }

	void setRadius( float radius ) { _radius = radius; }
	void setResourceExtracted( const Resource& r ) { _resource = &r; }

	virtual std::string toString() const { return std::string("Aspect: Resource Extractor"); }

private:
	float _radius;
	const Resource* _resource;
};

}

#endif /* RESOURCEEXTRACTORASPECT_H_ */
